Repository navigation
Give each scene source its own download timeout - #231
Open
chris-thomas-ga wants to merge 2 commits into
Open
chris-thomas-ga wants to merge 2 commits into
chris-thomas-ga wants to merge 2 commits into
Conversation
Previously one timeout covered the whole preference list and, on timeout, the first source was dropped and the rest retried, so a stalled later source could be retried and the pygssearch subprocess was left running. Each source now runs in its own forked process group with its own timeout (--scene-download-timeout-mins, default 60). On failure or timeout the process group is killed, partial files created by the attempt are removed and the next source is tried. Exit code 102 is kept for the case where all sources fail and at least one timed out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The 60 minute download timeout covered the whole preference list. On timeout it dropped the first source in the list rather than the one that was actually stuck. So if AUS_COP_HUB failed quickly and ASF hung, ASF got retried and a job could sit there for two or three hours. Terminating the pool also left the pygssearch download running in the background.
Each source now runs in its own process with its own timeout, and the next source is tried when it times out. The process runs in its own process group so the pygssearch subprocesses get killed with it, and any partial zip that attempt created is removed (an existing
.SAFEis left alone). Adds--scene-download-timeout-mins(default 60) to the CLI and run script. Exit code 102 is unchanged.Testing
tests/sar_pipeline/test_scene_download_timeout.pyuses fake sources that hang or fail (about 12s to run). Not tried against real downloads yet.Type of change